"use client"

import { Col, Row } from "antd";
import Link from "next/link";

const data = Array(20).fill("_").map((_, index) => ({
    id: index + 1,
    name: "用户" + (index + 1),
    desc: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quibusdam distinctio sit, iure deleniti esse eaque porro delectus, sapiente similique voluptas harum rerum ab hic maiores consequatur corporis, nobis libero vitae."
}))

export default async function Page() {
    return (
        <Row gutter={[16, 16]} style={{ padding: 8 }}>
            {
                data.map((user, index) => (<Col span={4} key={user.id} style={{ border: "1px solid #ccc", marginLeft: 8 }}>
                    <Link href={`/userList/${user.id}`} style={{ width: "100%" }}>
                        <div>{user.name}</div>
                        <div>简介：{user.desc}</div>
                    </Link>
                </Col>))
            }
        </Row>
    );
}